package com.rainbow.security

import com.rainbow.common.DateConverter
import org.springframework.context.annotation.Bean
import org.springframework.format.FormatterRegistry
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer
import java.util.concurrent.ExecutorService
import java.util.concurrent.Executors

class WebMvcConfig: WebMvcConfigurer {
    override fun addFormatters(registry: FormatterRegistry) {
        registry.addConverter(DateConverter())
    }

    @Bean
    fun executorService(): ExecutorService{
        return Executors.newCachedThreadPool()
    }
}